![]() |
PATH![]() |
![]() ![]() |
Navigation Services provides functions to display dialog boxes that prompt the user to select and open various types of file objects.
NavGetFile
displays an Open dialog box and prompts the user to select a file or files to be opened.NavChooseFile
displays a simple dialog box that prompts the user to select a file.NavTranslateFile
provides a means for files opened through Navigation Services to be read from different file formats.NavChooseVolume
displays a dialog box that prompts the user to choose a volume.NavChooseFolder
displays a dialog box that prompts the user to choose a folder or volume.NavChooseObject
displays a dialog box that prompts the user to choose a file, folder or volume.NavNewFolder
displays a dialog box that prompts the user to create a new folder.Displays an Open dialog box and prompts the user to select a file or files to be opened.
OSErr NavGetFile (AEDesc *defaultLocation,
NavReplyRecord *reply,
NavDialogOptions *dialogOptions,
NavEventUPP eventProc,
NavPreviewUPP previewProc,
NavObjectFilterUPP filterProc,
NavTypeListHandle typeList,
void *callBa
NavReplyRecord
. Upon return, Navigation Services uses this structure to provide data to your application about the results of your
NavGetFile
call.NavDialogOptions
. Before calling
NavGetFile
, set up this structure to specify dialog box settings. If you pass
NULL
in this parameter, Navigation Services uses the defaults for all options. see Configuration Option Constants for a description of the default settings. NavEventProcPtr
that points to your application-defined event-handling function. Obtain this UPP by calling the function
NewNavEventProc
. Implementing an event-handling function allows your application to update windows after the user moves or resizes the dialog box. If you pass
NULL
in this parameter, the Open dialog box is not movable or resizable. For more information, see Handling Events .NavPreviewProcPtr
that points to your application-defined preview function. Obtain this UPP by calling the function
NewNavPreviewProc
. A preview function allows your application to draw previews or to override Navigation Services previews. For more information, see Drawing Custom Previews.NavFilterProcPtr
that points to your application-defined filter function. Obtain this UPP by calling the function
NewNavObjectFilterProc
. An application-defined filter function determines if a volume, directory, or file should be displayed in the browser list or pop-up menus. For more information, see Filtering File Objects.NavTypeList
. Before calling, set up this structure to declare file types that your application can open. For more information, see Providing File Format Options.After your application calls the NavGetFile function to display an Open dialog box and the user selects one or more files and clicks the Open button, NavGetFile closes the dialog box and returns references to the files to be opened in the NavReplyRecord structure. Your application should check the validRecord field of the NavReplyRecord structure; if this field is set to true , your application should open the files specified in the selection field of the NavReplyRecord structure.
Always dispose of the
NavReplyRecord
structure after completing the file opening operation by calling the function
NavDisposeReply
. Failure to use the
NavDisposeReply
function causes memory used for the
NavReplyRecord
structure to remain allocated.
If you use the Show pop-up menu in an Open dialog box, your application must provide adequate kind strings to describe its native file types. For more information, see Providing File Format Options. For more information on kind strings, see Inside Macintosh: More Macintosh Toolbox .
For more information, see Opening Files.
For a sample code listing, see A Sample File-Saving Function.
Creates a simple dialog box that prompts the user to select a file.
OSErr NavChooseFile (AEDesc *defaultLocation,
NavReplyRecord *reply,
NavDialogOptions *dialogOptions,
NavEventUPP eventProc,
NavPreviewUPP previewProc,
NavObjectFilterUPP filterProc,
NavTypeListHandle typeList,
void *callBackUD);
NavReplyRecord
. Upon return, Navigation Services uses this structure to provide data to your application about the results of your
NavChooseFile
call.NavDialogOptions
. Before calling
NavChooseFile
, you can set up this structure to specify dialog box settings. If you pass
NULL
in this parameter, Navigation Services uses the defaults for all options. see Configuration Option Constants for a description of the default settings.NavEventProcPtr
that points to your application-defined event-handling function. Obtain this UPP by calling the function
NewNavEventProc
. Implementing an event-handling function allows your application to update windows after the user moves or resizes the dialog box. If you pass
NULL
in this parameter, the Choose a File dialog box is not movable or resizable. For more information, see Handling Events .NavPreviewProcPtr
that points to your application-defined preview function. Obtain this UPP by calling the function
NewNavPreviewProc
. A preview function allows your application to draw previews or to override Navigation Services previews. For more information, see Drawing Custom Previews.NavFilterProcPtr
that points to your application-defined filter function. Obtain this UPP by calling the function
NewNavObjectFilterProc
. An application-defined filter function determines if a volume, directory, or file should be displayed in the browser list or pop-up menus. For more information, see Filtering File Objects.NavTypeList
. Before calling
NavChooseFile
, you can set up this structure to declare file types that your application can open. For more information, see Providing File Format Options.
This function allows the user to choose a single file, such as a preferences file, for an action other than opening. The
NavChooseFile
function is similar to the
NavGetFile
function NavGetFile
, but is limited to selecting a single file.
The dialog box displayed by the NavChooseFile function does not display a Show menu. If you wish to control the files displayed by the browser list or the pop-up menus, you must specify a list of file types in the typeList parameter or specify a filter function in the filterProc parameter. If you specify a list of file types in the typeList parameter, the NavChooseFile function ignores the signature field of the NavTypeList structure. This means that all files of the types specified in the list of file types will be displayed, regardless of their application signature.
Provides a means for files opened through Navigation Services to be read from different file formats.
OSErr NavTranslateFile (NavReplyRecord *translateInfo,
NavTranslateOptions howToTranslate);
NavReplyRecord
. Upon return, Navigation Services uses this structure to provide translation information about the selected files.Under automatic file translation, Navigation Services calls the NavTranslateFile function, if necessary, before returning from a file-opening function.
Your application can perform its own translation using the
NavReplyRecord
structure you specified in the
translateInfo
parameter. The
NavReplyRecord
structure contains a list of descriptors for the file or files to be opened. The
NavReplyRecord
structure also contains a corresponding list of translation specification records that can be passed to the
Translation Manager. To determine if your application has to translate a file, your application can examine the
NavReplyRecord
structure to see if Navigation Services set the
translationNeeded
field to
true
. (The
translationNeeded
field of the
NavReplyRecord
structure is also set to
true
after returning from a
NavGetFile
call during which automatic translation was performed.) If you want to turn off automatic file translation, set the option
kNavDontAutoTranslate
in the
dialogOptionFlags
field of the structure of type NavDialogOptions
that you pass in the
dialogOptions
parameter of the file-opening function.
If your application uses the NavTranslateFile function after opening a file without automatic translation, Navigation Services prompts the user to select a location in which to save the translated file if the source location cannot accept a new file (as occurs when the volume is locked or there is insufficient space). The same prompt may occur when automatic translation is enabled in an Open dialog box.
Displays a dialog box that prompts the user to choose a volume.
OSErr NavChooseVolume(AEDesc *defaultSelection,
NavReplyRecord *reply,
NavDialogOptions *dialogOptions,
NavEventUPP eventProc,
NavFilterUPP filterProc,
void *callBackUD);
NavReplyRecord
. Upon return, Navigation Services uses this structure to provide data to your application about the results of your
NavChooseVolume
call.NavDialogOptions
. Before calling, set up this structure to specify dialog box settings. If you pass
NULL
in this parameter, Navigation Services uses the defaults for all options. see Configuration Option Constants for a description of the default settings.NavEventProcPtr
that points to your application-defined event-handling function. Obtain this UPP by calling the function
NewNavEventProc
. Implementing an event-handling function allows your application to update windows after the user moves or resizes the dialog box. If you pass
NULL
in this parameter, the Choose a Volume dialog box is not movable or resizable. For more information, see Handling Events .NavFilterProcPtr
that points to your application-defined filter function. Obtain this UPP by calling the function
NewNavObjectFilterProc
. An application-defined filter function determines if a volume, directory, or file should be displayed in the browser list or pop-up menus. For more information, see Filtering File Objects.This function provides a way for your application to prompt the user to select a volume. This might be useful for a disk repair utility, for example.
Displays a dialog box that prompts the user to choose a folder or volume.
OSErr NavChooseFolder(AEDesc *defaultLocation,
NavReplyRecord *reply,
NavDialogOptions *dialogOptions,
NavEventUPP eventProc,
NavObjectFilterUPP filterProc,
void *callBackUD);
NavReplyRecord
. Upon return, Navigation Services uses this structure to provide data to your application about the results of your
NavChooseFolder
call.NavDialogOptions
. Before calling
NavChooseFolder
, set up this structure to specify dialog box settings. If you pass
NULL
in this parameter, Navigation Services uses the defaults for all options. see Configuration Option Constants for a description of the default settings.NavEventProcPtr
that points to your application-defined event-handling function. Obtain this UPP by calling the function
NewNavEventProc
. Implementing an event-handling function allows your application to update windows after the user moves or resizes the dialog box. If you pass
NULL
in this parameter, the dialog box is not movable or resizable. For more information, see Handling Events .NavFilterProcPtr
that points to your application-defined filter function. Obtain this UPP by calling the function
NewNavObjectFilterProc
. An application-defined filter function determines if a volume, directory, or file should be displayed in the browser list or pop-up menus. For more information, see Filtering File Objects.This function provides a way for your application to prompt the user to select a folder or volume. This might be useful if you need to install application files, for example.
Displays a dialog box that prompts the user to choose a file, folder, or volume.
OSErr NavChooseObject(AEDesc *defaultLocation,
NavReplyRecord *reply,
NavDialogOptions *dialogOptions,
NavEventUPP eventProc,
NavObjectFilterUPP filterProc,
void *callBackUD);
NavReplyRecord
. Upon return, Navigation Services uses this structure to provide data to your application about the results of your
NavChooseObject
call.NavDialogOptions
. Before calling
NavChooseObject
, set up this structure to specify dialog box settings. If you do not provide this structure, Navigation Services uses the defaults for all options. see Configuration Option Constants for a description of the default settings.NavEventProcPtr
that points to your application-defined event-handling function. Obtain this UPP by calling the function
NewNavEventProc
. Implementing an event-handling function allows your application to update windows after the user moves or resizes the dialog box. If you pass
NULL
in this parameter, the dialog box is not movable or resizable. For more information, see Handling Events .NavFilterProcPtr
that points to your application-defined filter function. Obtain this UPP by calling the function
NewNavObjectFilterProc
. An application-defined filter function determines if a volume, directory, or file should be displayed in the browser list or pop-up menus. For more information, see Filtering File Objects.
This function is useful when you need to display a dialog box that prompts the user to choose a file object that might be a file, folder, or volume. If you want the user to choose a specific type of file object, you should use the function designed for that type of object; to select a file, for example, use the function NavChooseFile
.
Displays a dialog box that prompts the user to create a new folder.
OSErr NavNewFolder (AEDesc *defaultLocation,
NavReplyRecord *reply,
NavDialogOptions *dialogOptions,
NavEventUPP eventProc,
void *callBackUD);
NavReplyRecord
. Upon return, Navigation Services uses this structure to provide data to your application about the results of the
NavNewFolder
function call.NavDialogOptions
. Before calling
NavNewFolder
, set up this structure to specify dialog box settings. If you pass
NULL
in this parameter, Navigation Services uses the defaults for all options. see Configuration Option Constants for a description of the default settings. NavEventProcPtr
that points to your application-defined event-handling function. Obtain this UPP by calling the function
NewNavEventProc
. Implementing an event-handling function allows your application to update windows after the user moves or resizes the dialog box. If you pass
NULL
in this parameter, the dialog box is not movable or resizable. For more information, see Handling Events .This function provides a way for your application to prompt the user to create a new folder. This might be useful for creating a project folder, for example.
Previous | Back Up One Level | Next |